package com.iwhalecloud.bss.kite.cucc.dataservice.mapper.spec;

import com.iwhalecloud.bss.kite.dataservice.entity.OfferAttr;
import com.ztesoft.bss.base.extmapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CuccOfferAttrMapper extends BaseMapper<OfferAttr> {

    /**
     * 根据销售品ID和fieldName查询销售品属性
     * @param offerId
     * @param fieldName
     * @return
     */
    OfferAttr getOfferAttrByIdAndFieldName(@Param("offerId") String offerId, @Param("paramName") String paramName);

    /**
     * 根据销售品ID查询销售品属性集合（不查询-1）
     * @param offerId
     * @return
     */
    List<OfferAttr> listOfferAttrs(String offerId);

    /**
     * 根据销售品ID集合查询销售品属性集合（不查询-1）
     *
     * @param offerIdList 资费ID集合
     * @return 资费属性
     */
    List<OfferAttr> listOfferAttrList(@Param("offerIdList") List<String> offerIdList);

    /**
     * 批量插入
     *
     * @param offerAttrList offerAttrList
     */
    void insertOfferAttrList(@Param("offerAttrList") List<OfferAttr> offerAttrList);

    /**
     * 批量更新
     *
     * @param offerAttrList offerAttrList
     */
    void updateOfferAttrList(@Param("offerAttrList") List<OfferAttr> offerAttrList);
}
